package day01;

import java.util.Scanner;

public class Program05 {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        System.out.println("请输入年:");
        int year = scan.nextInt();
        System.out.println("请输入月:");
        int month = scan.nextInt();
        System.out.println("请输入日");
        int day = scan.nextInt();
        int sum =0;
        switch (month-=1){
            case 12:sum+=31;
            case 11:sum+=30;
            case 10:sum+=31;
            case 9:sum+=30;
            case 8:sum+=31;
            case 7:sum+=31;
            case 6:sum+=30;
            case 5:sum+=31;
            case 4:sum+=30;
            case 3:sum+=31;
            case 2: if (year % 4 == 0 && year % 100 != 0 || year % 400 == 0){
                sum += 28;
            } else {
                    sum+=29;
            }
                    case 1:sum+=31;
                        sum+=day;
                        System.out.println(year+"年"+month+"月"+day+"号在一年中是第"+sum+"天");

        }

    }
}
